-
Notifications
You must be signed in to change notification settings - Fork 9.4k
Fix incorrect grouped product qty returned in GraphQL due to hydration overwriting link attributes #40293
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: 2.4-develop
Are you sure you want to change the base?
Conversation
|
Hi @mimou78. Thank you for your contribution!
Allowed build names are:
You can find more information about the builds here For more details, review the Code Contributions documentation. |
|
@magento run Unit Tests |
|
@magento run all tests |
|
@magento run all tests |
|
@magento run Unit Tests |
Description
This pull request fixes an issue where GraphQL returns incorrect or inconsistent
qtyvalues for grouped product links.During GraphQL hydration, the
Product::getQty()value is overwritten because it represents a mutable runtime value rather than the original link attribute qty stored in the database.This causes:
1)This PR ensures that GraphQL consistently uses the original link quantity via
getInitialQty()(or an equivalent stable fallback), preventing overwriting and ensuring parity between REST and GraphQL.Related Pull Requests
None.
Fixed Issues